package FuntionTest;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

public class test1 {
    //需求：
    //1.将集合中的数据收集到Student[]中
    public static void main(String[] args) {
        ArrayList<String> list=new ArrayList<>();
        Collections.addAll(list,"zhangsan,18","lisi,19","wangwu,20");

        Student[] array = list.stream().map(Student::new).toArray(Student[]::new);
        System.out.println(Arrays.toString(array));
    }
}
